package com.erp.remote.warehouse;

import com.erp.entity.warehouse.QualityCheckDetail;
import com.erp.util.AjaxResult;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

@RequestMapping("/warehouse/quality")
public interface QualityCheckFailRemote {

    /**
     * 根据供应商id查找所有已经审核且,checkfailnum不为0的质检单详情(源单据为采购入库单)
     * @param providerId
     * @param companyId
     * @return
     */
    @RequestMapping("/getAllQualityCheckFail")
    AjaxResult getAllQualityCheckFail(@RequestParam("providerId") int  providerId, @RequestParam("companyId") int companyId);

    /**
     * 根据质检单详情id改质检单详情的checkfailnum
     * @param id
     * @return
     */
    @RequestMapping("/getQualityCheckFailById")
    int updateQualityCheckFailById(@RequestParam("id") int id, @RequestParam("checkFailNum") int checkFailNum);


    /**
     * 根据采购单id获取下游单据数量
     * @param id
     * @return
     */
    @RequestMapping("/getQualityBillByParentId")
    Integer getQualityBillByParentId(@RequestParam("id") int id, @RequestParam("companyId") int companyId);





    @PostMapping("/qulityWorkFlow")
    AjaxResult qulityWorkFlow(@RequestBody Map<String,Object> map);



    /**
     * 根据销货退货单id获取下游单据数量
     * @param id
     * @return
     */
    @RequestMapping("/getQualityBillBySaleId")
    Integer getQualityBillBySaleId(@RequestParam("id") int id, @RequestParam("companyId") int companyId);



}
